package com.crawler.demo.config;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import com.crawler.waf.config.WafProperties;

/**
 * 数据初始化
 * @author rubekid
 *
 * 2017年3月8日 下午12:19:36
 */
@Component
@Order(2)
public class AppDataInitializer implements ApplicationListener<ContextRefreshedEvent>{
	
	@Override
	public void onApplicationEvent(ContextRefreshedEvent event) {
		System.out.println("当前环境:" + WafProperties.getProperty("waf.environment"));
	}

}